package com.wujing.abstractdemo

object BankDemo {
  def main(args: Array[String]): Unit = {
    val account = new Account("321784039123", 3.213, "wwwan")
    account.query("wwwan")

  }

  class Account(inAccount:String,inBanlance:Double,inPwd:String){

    var accountNo: String =inAccount
    var balance: Double =inBanlance
    var pwd: String =inPwd

    def query(pwd:String): Unit ={
      printf("账号为%s,当前余额为%s",this.accountNo,this.balance)
    }


  }

}
